package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.entity.ProjectEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 版权声明：CopyRight (c) 2018 ucarinc. All Rights Reserved.
 *
 * @author : 张勇杰
 * @date : 2020/3/3 19:13
 * @Version : v1.0
 * @description
 **/
public interface ProjectEntityRepo extends JpaRepository<ProjectEntity, String>, JpaSpecificationExecutor<ProjectEntity> {

    Long countDistinctBelongSchoolByUserId(String userId);

    List<ProjectEntity> findAllByUserIdAndStatus(String userId, String status);

    List<ProjectEntity> findAllByLoanId(String loanId);

}
